home *** CD-ROM | disk | FTP | other *** search
/ CU Amiga Super CD-ROM 25 / CU Amiga Magazine's Super CD-ROM 25 (1998)(EMAP Images)(GB)(Track 1 of 2)[!][issue 1998-08].iso / CUCD / Programming / BlitzList / BlitzListFiles / OpenDiskFont.asc < prev    next >
Encoding:
Text File  |  1998-05-31  |  636 b   |  19 lines

  1. WBStartup : NoCli
  2.  
  3. FindScreen 0                  ;just open a screen and a window
  4. Window 0,0,0,300,100,0,"",0,1
  5.  
  6. DEFTYPE .TextAttr bla         ;use the structure of the TextAttr
  7.  
  8. bla\ta_Name="XHelvetica.font"      ;name of font to open
  9. bla\ta_YSize=18               ;size of font
  10. bla\ta_Style=#FS_NORMAL       ;use #FS_ITALIC etc for the style (#FS_UNDERLINED etc)
  11. bla\ta_Flags=#FPB_DISKFONT    ;font opens through diskfont.library (eg. not in ROM like topaz)
  12.  
  13. *a.l=OpenDiskFont_(&bla)      ;open the font
  14. a.l=SetFont_(RastPort(0),*a)  ;and attach the fontstructure to the opened window
  15.  
  16. Print "this was kinda kewl =)"
  17.  
  18. MouseWait : End
  19.